package conson.tech.manage.message.service.impl;


import conson.tech.manage.message.entity.vo.MessageUserRelationVo;
import conson.tech.manage.message.mapper.MessageUserRelationMapper;
import conson.tech.manage.message.service.MessageUserRelationService;
import conson.tech.manage.message.entity.pojo.MessageUserRelation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * ClassName: MessageUserRelationServiceImpl
 * Description:
 * Author: HXL
 * Date: 2020/4/22 9:50 上午
 * Version: 1.0
 */
@Service("messageUserRelationService")
public class MessageUserRelationServiceImpl implements MessageUserRelationService {
    @Autowired
    private MessageUserRelationMapper messageUserRelationMapper;
    @Override
    @Transactional
    public int createMessage(MessageUserRelationVo vo) {
        MessageUserRelation config = new MessageUserRelation();
        BeanUtils.copyProperties(vo, config);
        return messageUserRelationMapper.insert(config);
    }
}
